package com.tujia.lambda;

import java.io.Serializable;

public class User implements Serializable {
    private static final long serialVersionUID = 2063763542681453305L;
    private Integer age;
    private String name;
    private Integer salary;

    public User(Integer age, String name, Integer salary) {
        this.age = age;
        this.name = name;
        this.salary = salary;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getSalary() {
        return salary;
    }

    public void setSalary(Integer salary) {
        this.salary = salary;
    }

    public boolean filter(User user){
        System.out.println("用户: " + user.name);
        return user.getSalary() > 60;
    }

    @Override
    public String toString() {
        return "User{" +
                "age=" + age +
                ", name='" + name + '\'' +
                ", salary=" + salary +
                '}';
    }
}
